package cn.stylefeng.guns.sys.modular.system.entity.Enum;

import lombok.Getter;

/**
 * 角色枚举类
 *
 * @author jiangge
 * @Date 2020/9/26 14:45
 */
@Getter
public enum RoleIdEnum  {
    ROLE_KFRY(1305313791343853569L, "开发人员"),

    ROLE_KFZJ(1305422111420379138L, "开发总监"),

    ROLE_KFQYJL(1551438074902560769L, "开发区域经理"),

    ROLE_GCZJ(1305422420779659266L, "工程总监"),

    ROLE_YYZJ(1305422678196678657L, "营运总监"),

    ROLE_YYJL(1308249608428101633L, "营运经理"),

    ROLE_DD(1283292980305018882L, "督导"),

    ROLE_NETSHOP(1307580056085250050L, "网上建店负责人"),

    ROLE_GCB(1308687414966087681L, "工程部"),

    ROLE_GCYQ(1341649329422004225L, "工程逾期"),

    ROLE_GYL(1314441729702100993L,"供应链"),


    ROLE_PS(1278615893124055041L,"配送管理"),

    ROLE_STORE_MANAGER(1293016774334623746L,"店长"),
    ROLE_GC_ADMIN(1374547334375333890L,"工程管理员"),
    ROLE_KELEJI(1314488482857709570L,"可乐机负责人"),
    ROLE_SYDA(1370241296749101057L,"收银档案负责人"),

    ROLE_WSJD(1391574425204678658L,"网上建店"),
    ROLE_XSTC(1391574556998098945L,"排队机、线上套餐"),

    ;

    RoleIdEnum(Long code, String message) {
        this.code = code;
        this.message = message;
    }

    private Long code;

    private String message;

    public static RoleIdEnum getByMsg(String value){
        for(RoleIdEnum roleIdEnum : values()){
            if (roleIdEnum.getMessage().equals(value)) {
                return roleIdEnum;
            }
        }
        return null;
    }

    public static RoleIdEnum getByCode(Long value){
        for(RoleIdEnum roleIdEnum : values()){
            if (roleIdEnum.getCode().equals(value)) {
                return roleIdEnum;
            }
        }
        return null;
    }

}
